package org.grpc.demo.service;

import io.grpc.stub.StreamObserver;
import org.grpc.demo.common.GeeterGrpc;
import org.grpc.demo.common.HelloGreeting;
import org.grpc.demo.common.HelloReply;

public class GreeterImpl extends GeeterGrpc.GeeterImplBase{
	@Override
	public void sayHello(HelloGreeting request, StreamObserver<HelloReply> responseObserver) {
		HelloReply reply = HelloReply.newBuilder().setMessage("Hello " + request.getName()).build();
		responseObserver.onNext(reply);
		responseObserver.onCompleted();
	}
}
